<?php
require_once(dirname(__FILE__)."/../include/common.inc.php");
require("class.phpmailer.php"); //下载的文件必须放在该文件所在目录

$FromAdd=$_POST["fromadd"];
$BodyArt=$_POST["body"];
$Subject1=$_POST["subject"];
$weburl=$_POST["weburl"];
$webname=$_POST["webname"];
$art=$_POST["art"];

$BodyArt1="<div style='font-size:14px; line-height:200%;'><strong>发送人邮箱地址：</strong>".$FromAdd."<br /><strong>发送邮件的地址：</strong>".$weburl."<br /><strong>所在栏目结构：</strong>".$webname."<br /><strong>文章标题：</strong>".$art."</div>"."<br /><strong>邮件内容：</strong><br />".$BodyArt;

$mail = new PHPMailer(); //建立邮件发送类
$address ="524201432@qq.com";
$mail->IsSMTP(); // 使用SMTP方式发送
$mail->Host = "smtp.qq.com"; // 您的企业邮局域名
$mail->SMTPAuth = true; // 启用SMTP验证功能
$mail->Username = "524201432@qq.com"; // 邮局用户名(请填写完整的email地址)
$mail->Password = "xugaoxin1986917"; // 邮局密码
$mail->Port=25;
$mail->From = "524201432@qq.com"; //邮件发送者email地址
$mail->FromName = " ";
$mail->AddAddress("$address", "a");//收件人地址，可以替换成任何想要接收邮件的email信箱,格式是AddAddress("收件人email","收件人姓名")
//$mail->AddReplyTo("", "");

//$mail->AddAttachment("/var/tmp/file.tar.gz"); // 添加附件
$mail->IsHTML(true); // set email format to HTML //是否使用HTML格式

$mail->Subject = $Subject1; //邮件标题
$mail->Body = $BodyArt1; //邮件内容
$mail->AltBody = ""; //附加信息，可以省略

if(!$mail->Send())
{
ShowMsg_en("Invia mail non riuscita, la causa dell'errore:". $mail->ErrorInfo,"-1");
exit;
}
ShowMsg_en("Mail inviata con successo!","-1");

?>
